<%@ page import="org.windey.server.database.*" %>
<%

if (request.getParameter("register") == null) {
	response.sendRedirect("register.jsp");
}
else {
	String email = request.getParameter("email");
	String pass = request.getParameter("pass");
	User user = new User();
	user.setEmail(email);
	Md5Generator md5 = new Md5Generator();
	user.setPasword(md5.generateMD5(pass));
	Database.create(user);
	response.sendRedirect("index.jsp");
}

%>